package com.zt.student.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zt.common.pojo.homework.HomeworkAnswer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * description:
 * author:zt
 * date:2022-02-13
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class HomeworkWithClassDTO {

    private int classId;

    private String className;

    private int homeworkId;

    private String homeworkName;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date deadline;

    private String question;

    //判断学生是否已提交作业
    private boolean submitted;

    private HomeworkAnswer homeworkAnswer;
}
